22.03.15 - Advanced Version Control
Branches
Designed to 'let you branch off' and work on something. So your not on the main code Creates a copy of the code you branched from Can make git folder show any branch
Merging
Want to tell your dev manager that your code is ready They will be the ones who merge it into your code. Bit like approving/adopting your code
Problems switching
Option 0 - everything is fully committed, so no problems. Changes the files you are looking at only Option 1 - Carry your edited-but-not-added files with you. Only changes the files your looking at. Option 2 - Stash stores current working files for later use without committing them Option 3 - Go somewhere completely different on computer
Collaborating over branches
Need to push and pull for the branches to be created. Can track between branches on a server and specific branches on versions
If wanting to work on remote branch would need to do
git checkout --track origin/name
To let others work on the branch would do
git push -u origin name
Asking to Merger
Important branches are protected, so they cant be accessed. Only some people have the ability. To do merger request, need to do it in the user interface. Shows the owner of the protected branch the code and then they approve it. Once its merged, the branch gets deleted
Workflows
Any issue created, create a new branch. Pull branch down,, write code then commit/push to that branch. The merger and resolve the issue Code review is considered important by everyone. Set it up so the code gets reviewed by someone, and they are the ones who can merge it